export backupsdir=/root/backup/inspector-time/mysql_backups
export d=`eval date +%Y%m%d`
mkdir -p $backupsdir/$d
for i in `echo "show tables" | mysql -hmercury.mkode.com -u root -p5tucc012 inspector-time|grep -v Tables_in_`;
do
  echo $i; mysqldump --add-drop-table --allow-keywords -q -a -c -hmercury.mkode.com -u root -p5tucc012 inspector-time $i > $backupsdir/$d/$i.sql
  rm -f $backupsdir/$d/$i.sql.gz
  gzip $backupsdir/$d/$i.sql
done 
